﻿@inherits BaseButton
<button type="@Type.ToButtonTypeString()" class="@ClassMapper.Class" style="@StyleMapper.Style" disabled="@IsDisabled" aria-pressed="@IsActive" @onclick="@ClickHandler">
    @if ( IsLoading )
    {
        <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
    }
    @ChildContent
</button>
@code{
    protected override void OnInitialized()
    {
        ParentAddon?.Hook( this );

        base.OnInitialized();
    }

    [CascadingParameter] protected Addon ParentAddon { get; set; }
}